home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3470 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: ohstpy.mps.ohio-state.edu!vancleef
  2. From: vancleef@ohstpy.mps.ohio-state.edu
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Automatic data segment ???
  5. Message-ID: <1996Jan24.033619.8807@ohstpy>
  6. Date: 24 Jan 96 03:36:19 -0500
  7. References: <NEWTNews.822036255.26727.danipear@dialup.netvision.net.il> <1996Jan24.042823.29086@merlin.hgc.edu>
  8. Organization: The Ohio State University, Department of Physics
  9.  
  10. In article <1996Jan24.042823.29086@merlin.hgc.edu>, weat4122@hgc.edu (gerard weatherby) writes:
  11. > In article <4dun33$agf@news.cyberportal.net> dtrues <204.97.234.41> writes:
  12. >>Dani Pear <danipear@netvision.net.il> wrote:
  13. >>>
  14. >>>Hi,
  15. >>>In our windows application that is in C++, we can not
  16. >>>link and create an EXE, and we receive the following 
  17. >>>message: "Automatic data segment exceeds 64K".
  18. >>>What are the reasons for this error.
  19. >>>
  20. >>>Email : danipear@netvision.net.il
  21. >>>
  22.  
  23.  
  24. I ran into this problem a few days ago using Borland 3.1 C++. I
  25. set the far data threshold to 0 and set automatic far data (or something
  26. like that) and that helped trmendously. Of course I am
  27. using far pointers now but I think I can live with it.
  28.  
  29. Note you wont run into this stuff in a flat model, but thats
  30. another issue.
  31.  
  32. -G
  33.  
  34.  
  35. >>
  36. >>
  37. >>We have run into the same problem.  It seems that you are only allowed 
  38. >>64K of space for the heap, stack, and all of the automatic variables used 
  39. >>in the code (or something to that effect).  Keep in mind that an array of 
  40. >>classes can tie up memory quickly.  We get around that by dynamically 
  41. >>allocating most of our classes.  We use the large memory model and 
  42. >>nothing but far pointers.  (You will need to use far pointers, 
  43. >>otherwise you will be allocating memory from the local heap, which 
  44. >>tends to fill up pretty quickly.  We have developed a library that will 
  45. >>allow us to use more than the 640K memory on todays computers.  The 
  46. >>method is described in Peter Norton and Pal Yao's book on windows 
  47. >>programming.
  48. >>
  49. >>Good luck and get out of Bill's 16-bit environment as soon as possible.
  50. >>
  51. >>Dan
  52. >>
  53. > If you're using Visual C++ 1.52, look into the eliminate duplicate 
  54. > strings switch /Gf, I think, and the /Gt automatic far data switches.
  55.